{extend name="pub/base2" /}
{block name="title"}
<title>分类新增</title>
{/block}

{block name="body"}
<article class="clearfix pd-20">
    <form action="{:url('save')}" method="post" class="form form-horizontal" enctype="multipart/form-data">
        <div class="row clearfix">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>分类名：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="" name="tag_name">
            </div>
        </div>

        <div class="row clearfix">
            <label class="form-label col-xs-4 col-sm-3">缩略图：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="file" name="cover" class="input-text">
            </div>
        </div>

        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</article>

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
    $(function () {
        $("form").validate({
            rules: {
                tag_name: {
                    required: true
                }
            },
            onkeyup: false,
            focusCleanup: false,
            success: "valid",
        });
    });
</script>
<!--/请在上方写此页面业务相关的脚本-->
{/block}